<#include "/macro_.ftl">
package ${packageCode}.${moduleMapperCode}.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.*;
import java.math.*;

/**
 * ${moduleName}-${businessName!}
 *
 * @author ${author!'yao hai tao'}
 */
@ApiModel(description = "${moduleName}-${businessName!}")
@Data
@Accessors(chain = true)
@TableName("${entityMapper.tableName}")
public class ${businessCode} implements java.io.Serializable {
<#list entityMapper.fieldMapperMap?values as fieldMapper>

    /**
     * <@defaultIfBlank str="${fieldMapper.remarks!}" defaultSt="${fieldMapper.code!}"/>
     */
    @ApiModelProperty(value = "<@defaultIfBlank str="${fieldMapper.remarks!}" defaultSt="${fieldMapper.code!}"/>")
	 <#if StringUtils.isNotBlank(fieldMapper.pkName)>
    @TableId(value = "${fieldMapper.columnName}", type = IdType.ASSIGN_ID)
	 <#elseif ArrayUtils.contains(['created_by_id', 'created_by_code', 'created_date'], fieldMapper.columnName) >
    @TableField(value = "${fieldMapper.columnName}", fill = FieldFill.INSERT)
	 <#elseif ArrayUtils.contains(['last_modified_by_id', 'last_modified_by_code', 'last_modified_date'], fieldMapper.columnName) >
    @TableField(value = "${fieldMapper.columnName}", fill = FieldFill.INSERT_UPDATE)
	<#else>
	@TableField("${fieldMapper.columnName}")
	</#if>
    protected ${fieldMapper.typeCode!'String'} ${fieldMapper.code};
</#list>
}